package com.milk.system.converter;

import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.milk.system.model.dto.ProductsDTO;
import com.milk.system.model.entity.Products;
import com.milk.system.model.vo.ProductsPageVO;
import com.milk.system.model.form.ProductsForm;
import com.milk.system.model.bo.ProductsBO;

/**
 * 商品信息表转换器
 *
 * @author milk
 * @since 2024-05-02
 */
@Mapper(componentModel = "spring")
public interface ProductsConverter{

    ProductsPageVO bo2PageVo(Products bo);

    Page<ProductsPageVO> bo2PageVo(Page<Products> bo);

    ProductsForm entity2Form(Products entity);

    @InheritInverseConfiguration(name = "entity2Form")
    Products form2Entity(ProductsForm entity);
}